using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Com.ArHat.Model.Models.Mapping
{
    public class UserMap : EntityTypeConfiguration<User>
    {
        public UserMap()
        {
            // Primary Key
            this.HasKey(t => t.UserID);

            // Properties
            this.Property(t => t.Sid)
                .HasMaxLength(85);

            this.Property(t => t.UserName)
                .HasMaxLength(260);

            // Table & Column Mappings
            this.ToTable("Users");
            this.Property(t => t.UserID).HasColumnName("UserID");
            this.Property(t => t.Sid).HasColumnName("Sid");
            this.Property(t => t.UserType).HasColumnName("UserType");
            this.Property(t => t.AuthType).HasColumnName("AuthType");
            this.Property(t => t.UserName).HasColumnName("UserName");
        }
    }
}
